package com.xt.shop.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.page.PageMethod;
import com.xt.shop.Model.UserInfo;
import com.xt.shop.service.UserInfoService;
import com.xt.shop.mapper.UserInfoMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 24862
* @description 针对表【user_info】的数据库操作Service实现
* @createDate 2024-01-08 16:00:12
*/
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
    implements UserInfoService{
    @Resource
    UserInfoMapper userInfoMapper;

    @Override
    public PageInfo<UserInfo> queryList(int page, int item, String name) {
        PageMethod.startPage(page,item);
        List<UserInfo> userInfos = userInfoMapper.queryByName(name);
        PageInfo<UserInfo> pageInfo=new PageInfo<>(userInfos);
        return pageInfo;
    }
}




